import Router from 'koa-router'
import PublicController from '@/api/PublicController'
import ContentController from '@/api/ContentController'
import UserController from '@/api/UserController.js'
import CommentController from '@/api/CommentController'
const router = new Router({
  prefix: '/public'
})
// 获取验证码
router.get('/captcha', PublicController.getCaptcha)

router.get('/demo', PublicController.demo)

// 获取文章列表
router.get('/list', ContentController.getList)

// 获取友情链接
router.get('/links', ContentController.getLinks)

// 获取温馨提醒
router.get('/tips', ContentController.getTips)

// 获取本周热议
router.get('/topWeek', ContentController.getTopWeek)

// 更新邮箱
router.get('/reset-email', UserController.updateEmail)

// 查看文章
router.get('/content/detail', ContentController.getPostDetail)

// 获取评论
router.get('/comments', CommentController.getCommentsList)

// 获取用户信息
router.get('/user/info', UserController.getUserInfo)

// 获取用户帖子
router.get('/user/post', UserController.getMyPost)

// 获取用户评论
router.get('/user/comments', CommentController.getUserComments)
export default router
